﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<#include "/pages/include/include.ftl" />
<@h.css href="/css/uc.css"/>
<@h.js src="/javascripts/public/news.js"/>
<@h.js src="/javascripts/public/link.js"/>
<#include "/pages/include/setlayout.ftl" />
<script type="text/javascript">
	var news=new news();
	var link=new link();
		$(function(){
			$("#navtab1").ligerTab({
				onBeforeSelectTabItem:function(TabID){
					if($('#tab').val()==TabID)
						return;
					$('#'+TabID).loading();
					window.location.href="?curTab="+TabID;
				}
			});
			//all select
			$('#IN .allSelect').click(function(){
				link.checkInAll($(this));
			});
			//delete
			$('#delBatch').click(function(){
				link.delBatch('${curTab}');
			});
		});
</script>
</head>

<body>
<#assign menuId="link">
<div id="layout1" class="wrapper">

<#include "/pages/include/top.ftl" />
	
	<#include "/pages/person/myfile/file_menu.ftl" />
	
	<div position="center" title="链接管理">
		<div class="action-div">
		<#if action.hasAuth("LINK_DEL")>
			<a id="delBatch" class="minibutton"><span>删除</span></a>
		</#if>
		<#if action.hasAuth("LINK_ADD")>
			<a id="btnAdd" href="javascript:link.showAdd();" class="minibutton"><span>新增</span></a>
		</#if>
		</div>
		<div id="navtab1">
			<div id="IN" tabid="IN" <#if curTab=='IN'>lselected="true"</#if>  title="内部链接" class="sList">
				<table width="100%" class="sTable" cellpadding="0" cellspacing="0" border="0" >
					<tr>
						<td class="sTh checkbox" ><input class="inputCheckbox allSelect" type="checkbox" id="" name="" /></td>
						<th class="sTh">名称</th>
						<th class="sTh">链接</th>
						<th class="sTh">操作</th>
						<th class="sTh">排序</th>
					</tr>
				<#if links?exists>
				<#list links as a>
					<tr class="<#if a_index%2==0>sRow2<#else>sRow1</#if>">
					<td class="sCell" ><input class="inputCheckbox selectItem" type="checkbox" value="${a.id?if_exists}" /></td>
						<td class="sCell" style="width:200px">
						<a class="f14" href="${a.url?if_exists}" title="${a.title?if_exists} ">
						${a.title?if_exists} </a></td>
						<td class="sCell">${a.url?if_exists}</td>
						<td class="sCell" style="width:200px">
						<#if action.hasAuth("LINK_EDIT")>
						<a class="op" href="javascript:link.editLink('${a.id?if_exists}')">编辑</a>
						</#if>
						</td>
						<td class="sCell">
								<a class="sliverbutton"  onclick="link.up('${a.id}');"><span>向上</span></a>
								<a class="sliverbutton"  onclick="link.down('${a.id}');"><span>向下</span></a>
								<a class="sliverbutton"  onclick="link.top('${a.id}');"><span>置顶</span></a>
						</td>
					</tr>
				</#list>
				</#if>
				</table>
			</div>
			<div id="OUT" tabid="OUT" <#if curTab=='OUT'>lselected="true"</#if> title="外部链接" class="sList">
				<table width="100%" class="sTable" cellpadding="0" cellspacing="0" border="0" >
					<tr>
						<td class="sTh checkbox" ><input class="inputCheckbox allSelect" type="checkbox" id="" name="" /></td>
						<th class="sTh">名称</th>
						<th class="sTh">链接</th>
						<th class="sTh">操作</th>
						<th class="sTh">排序</th>
					</tr>
				<#if links?exists>
				<#list links as a>
					<tr class="<#if a_index%2==0>sRow2<#else>sRow1</#if>">
					<td class="sCell" ><input class="inputCheckbox selectItem" type="checkbox" value="${a.id?if_exists}" /></td>
						<td class="sCell" style="width:200px">
						<a class="f14" href="${a.url?if_exists}" title="${a.title?if_exists} ">
						${a.title?if_exists} </a></td>
						<td class="sCell">${a.url?if_exists}</td>
						<td class="sCell" style="width:200px">
						<#if action.hasAuth("LINK_EDIT")>
						<a class="op" href="javascript:link.editLink('${a.id?if_exists}')">编辑</a>
						</#if>
						</td>
						<td class="sCell">
								<a class="sliverbutton"  onclick="link.up('${a.id}');"><span>向上</span></a>
								<a class="sliverbutton"  onclick="link.down('${a.id}');"><span>向下</span></a>
								<a class="sliverbutton"  onclick="link.top('${a.id}');"><span>置顶</span></a>
						</td>
					</tr>
				</#list>
				</#if>
				</table>
			</div>
		</div>	
	</div>
	
	
	<#include "/pages/include/bottom.ftl" />
	<input type="hidden" id="tab" value="${curTab}"/>
</div>

</body>

</html>
